import Vue from 'vue';
import VueRouter, { RouterLink } from 'vue-router';
// 导入组件
// 可根据实际情况添加更多组件
// import AnotherComponent from '../components/AnotherComponent.vue';

Vue.use(VueRouter)

// 定义路由
const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../components/SingleMap.vue')
  },
  {
    path: '/map',
    name: 'Map',
    meta: {
      title: '平面地图'
    },
    component: () => import('../components/SingleMap.vue')
  },
  {
    path: '/map3D',
    name: 'Map3D',
    meta: {
      title: '3D地图'
    },
    component: () => import('../3DChinaMap/index.vue')
  },
  {
    path: '/map3DGradient',
    name: 'Map3DGradient',
    meta: {
      title: '渐变3D地图'
    },
    component: () => import('../GLmap3D/index.vue')
  },
  {
    path: '/xBar',
    name: 'xBar',
    meta: {
      title: '横向柱状图'
    },
    component: () => import('../pages/xBar/index.vue')

  },
  // {
  //   path: '/bigScreen',
  //   name: 'BigScreen',
  //   meta: {
  //     title: '大屏展示'
  //   },
  //   component: () => import('../pages/bigScreen/index.vue')
  // },
    {
      path: '/lowPassRate',
      name: 'LowPassRate',
      meta: {
        title: '低通率分析'
      },
      component: () => import('../pages/staticAnalysis/lowPassRate/index.vue')
    },
    {
      path: '/customReport',
      name: 'CustomReport',
      meta: {
        title: '自定义报表'
      },
      component: () => import('../pages/staticAnalysis/customReport/index.vue')
    },
    {
      path: '/riskBigScreen',
      name: 'RiskBigScreen',
      meta: {
        title: '风险大屏'
      },
      component: () => import('../pages/riskBigScreen/components/map.vue')
    },
 
];

// const createRouter = () => new VueRouter(routes)


// const router = createRouter()

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router;